﻿Imports System.IO

Module Module1

	Sub Main()
		Dim myvCard As New vCard.vCard2_1

		myvCard.vCardItems.Add(New vCard.FormattedName("Jóse Smith "))
		myvCard.vCardItems.Add(New vCard.eMail("joseemail@localhost"))
		myvCard.vCardItems.Add(New vCard.eMail("joseemail2@localhost"))
		myvCard.vCardItems.Add(New vCard.Comment(String.Format("Hi there{0}你好！你的名字是什么？", Environment.NewLine)))

		Dim myPhone As New vCard.TelephoneNumber("132-456-7890")
		myPhone.IsHome = True
		myvCard.vCardItems.Add(myPhone)

		Dim vCard As String = myvCard.BuildvCardString

		Console.WriteLine(vCard)

		Using sWriter As New StreamWriter("c:\temp\output.vcf", False)
			sWriter.Write(vCard)
		End Using

		Console.ReadLine()
	End Sub

End Module
